package models

import "encoding/xml"

// <?xml version="1.0" encoding="UTF-8"?>
// <EZVIZ version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
//     <enabled>false</enabled>
//     <registerStatus>false</registerStatus>
//     <redirect>true</redirect>
//     <serverAddress>
//         <addressingFormatType>hostname</addressingFormatType>
//         <hostName>litedev.ys7.com</hostName>
//     </serverAddress>
//     <verificationCode>GLODON</verificationCode>
//     <offlineStatus>secretKeyInvalid</offlineStatus>
// </EZVIZ>

type EZVIZ struct {
	XMLName          xml.Name `xml:"EZVIZ"`
	Version          string   `xml:"version,attr"`
	Enabled          bool     `xml:"enabled"`
	RegisterStatus   bool     `xml:"registerStatus"`
	VerificationCode string   `xml:"verificationCode"`
	OfflineStatus    string   `xml:"offlineStatus"`
	//Description string   `xml:",innerxml"`
}

// <?xml version="1.0" encoding="UTF-8"?>
// <ResponseStatus version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
//     <requestURL>/ISAPI/System/Network/EZVIZ</requestURL>
//     <statusCode>1</statusCode>
//     <statusString>OK</statusString>
//     <subStatusCode>ok</subStatusCode>
// </ResponseStatus>

type EZVIZResponseStatus struct {
	XMLName       xml.Name `xml:"ResponseStatus"`
	Version       string   `xml:"version,attr"`
	RequestURL    string   `xml:"requestURL"`
	StatusCode    int      `xml:"statusCode"`
	StatusString  string   `xml:"statusString"`
	SubStatusCode string   `xml:"subStatusCode"`
	//Description string   `xml:",innerxml"`
}
